<script lang="ts">
import { h } from "vue";
export default {
    props:{
        msg:String
    },
    setup(props){
        const renderContent=()=>{
            return h('div',[
                h('h1','通过vue的h函数自定义渲染'+props.msg),
                h('p','This content is rendered using a render function in setup()'),
                h('button',{onClick:()=>alert('button clicked')},'点我')
            ])
        }
        return {
            renderContent
        }
    },
    render(){
        return this.renderContent()
    }
}
</script>